The present invention relates generally to integrated circuits, and more specifically to techniques for programming and testing an embedded system by interchanging access to program space and data space.
As micro-electronic technology advances, it is possible to design and fabricate more and more complicated integrated circuits. An important class of integrated circuits is embedded systems, which cover any integrated circuit (or “chip”) having an embedded core and an internal memory. The embedded core is a processing unit (e.g., a processor, a controller, or some other unit) designed to perform processing tasks for the embedded system. The internal memory provides storage for data used by the embedded core.
To provide flexibility, the embedded core is typically designed with some amount of programmability. In a common implementation, the embedded core is a processor designed to execute a set of instructions (which is typically referred to as “firmware” or “codes”) stored in the memory. For this design, by providing different sets of instructions in the memory, different applications, features, and functionality may be supported by the embedded system.
For most chips with an embedded core, the programming of the chip is a important consideration (and is also typically a major issue). In some designs, the embedded system is programmed once, typically at the time of manufacturing or testing, for a particular application. These designs may be acceptable for applications that are mature and unlikely to change over time. In some other designs, the embedded system is designed with the ability to reprogram, as necessary. By providing the ability to reprogram the chip, the application firmware of the chip can easily be updated.
In-System Programming (ISP) is a solution that provides the flexibility to reprogram an embedded system. With ISP, the embedded core executes instructions from a fixed read-only-memory (ROM) (which is often referred to as a “boot ROM”) to program a digital on-chip non-volatile memory (e.g., a Flash memory or a ROM). The ISP, while providing the desired flexibility to reprogram the embedded system, has several disadvantages. In particular, for ISP, a fixed boot ROM is typically needed to store the instructions for programming the non-volatile memory. The boot ROM is conventionally a separate entity from the on-chip non-volatile memory and its contents are fixed. The boot ROM requires additional silicon area and thus increases the size of the chip die. The larger die size then contributes to a decrease in production yield and hence an increase in production cost for the embedded system with ISP.
For chips with an embedded core, the testing of the chip is also another important consideration. Typically, the testing of such chips is done with the use of test pins, which are pins used only during testing (and not for normal operation) to facilitate testing procedures. The test pins, while providing the necessary access and stimuli to the embedded system, have several disadvantages. In particular, the test pins can occupy a relatively large amount of silicon area. The larger silicon area then contributes to a decrease in production yield and an increase in production cost for the embedded system. Moreover, external stimuli are required to interface with the test pins to test the chip.
As can be seen, techniques that can program and/or test an embedded system, and which ameliorate the disadvantages described above, are highly desirable.